package smetana.domain.join;

import smetana.domain.raw.DocPosition;

import java.math.BigDecimal;

import static org.apache.commons.lang.StringUtils.defaultString;

/**
 * @author dmitry.mamonov
 */
public class DocPositionReport extends DocPosition {
    String positionGroupName;
    String positionName;
    String unit;
    String positionTypeName;
    BigDecimal totalPrice;

    protected DocPositionReport() {
        super();
    }

    public String getPositionGroupName() {
        return defaultString(positionGroupName);
    }

    public void setPositionGroupName(String positionGroupName) {
        this.positionGroupName = positionGroupName;
    }

    public String getPositionName() {
        return defaultString(positionName);
    }

    public void setPositionName(String positionName) {
        this.positionName = positionName;
    }

    public String getUnit() {
        return defaultString(unit);
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getPositionTypeName() {
        return defaultString(positionTypeName);
    }

    public void setPositionTypeName(String productType) {
        this.positionTypeName = productType;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice == null ? BigDecimal.ZERO : totalPrice;
    }

    public void setTotalPrice(BigDecimal price) {
        this.totalPrice = price;
    }
}
